package io.renren.modules.psorder.dao;

import io.renren.modules.psorder.entity.PsOrderEntity;
import io.renren.modules.sys.dao.BaseDao;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 配送订单表
 * 
 * @author wangdajiang
 * @email 2750757088@qq.com
 * @date 2017-12-02 17:22:15
 */
@Mapper
public interface PsOrderDao extends BaseDao<PsOrderEntity> {

    PsOrderEntity queryByOrderNum(String orderNum);

    int receivePsOrder(PsOrderEntity psOrder);

    List<PsOrderEntity> driverQueryPushRecords(String driverUser);

    List<PsOrderEntity> driverQueryOnGoingPsOrder(Map<String, Object> map);

    /**
     * 司机查询已结束订单
     * @param map 查询条件
     * @return
     */
    List<PsOrderEntity> driverQueryEndPsOrder(Map<String, Object> map);

    List<PsOrderEntity> userQueryOnGoingPsOrder(Long userId);

    List<PsOrderEntity> userQueryCompletedPsOrder(Long userId);

    List<PsOrderEntity> userQueryCancelPsOrder(Long userId);

    //订单导出
    List<PsOrderEntity> queryListExcel(Map<String, Object> map);

}
